#include "PowerUp5Processor.h"
#include "Power5Buff.h"
#include "MainLayer.h"
#include "InputLayer.h"

PowerUp5Processor::PowerUp5Processor(void)
{
	_time = 0;
}


PowerUp5Processor::~PowerUp5Processor(void)
{
}

void PowerUp5Processor::process( PlayerPlane* plane, MainLayer* mainLayer )
{
	Power5Buff* buff = Power5Buff::create();
	buff->setTimeMax(_time);
	buff->setPlane(plane);
	buff->setId(getId());

	mainLayer->getInputLayer()->getStateBar()->addBuff(buff);
}

void PowerUp5Processor::parseXml( xml_node node )
{
	float time = node.child("Time").text().as_float();
	_time = time;
}
